/*  File Name	: FirewallSetting.h
 *  Author		: Javie Pong
 *	 E-mail		: 823960168@qq.com
 *  Created on	: 2012-10-1
 *  Description:
 */

#ifndef MikrotikAPITypes_H_
#define MikrotikAPITypes_H_
#include "Define.h"

class Sentence
{
public:
	Sentence();
	virtual ~Sentence();

	void SetReturnType(int returnTypeIn);
	int GetReturnType();

	void AddWord(const std::string &strWordToAdd);
	std::string GetWord(int index);
	std::string operator[](int index);

	int Length();

	void GetMap(StrMap &sentenceMap);

	void Print();
	void Clear();

private:
	void Tokenize(const std::string &str, StrVector &tokens,const std::string &delimiters = "");

	StrVector strWords;
	int returnType;
};

//////////////////////////////////////////////////////////////////////////////////////

class Block
{
public:
	Block();
	virtual ~Block();

	void AddSentence(const Sentence &sentence);
	Sentence operator[](int index);
	int Length();
	void Print();
	void Clear();

private:
	std::vector<Sentence> sentences;
};

#endif/*MikrotikAPITypes_H_*/
